<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8" />
    <title>问题详情</title>
    <link rel="stylesheet" href="css/yueke.css">
    <link rel="stylesheet" href="ubox/ubox.css">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="underscore/underscore-min.js"></script>
    <script type="text/javascript" src="js/list_more.js"></script>
    <script type="text/javascript" charset="utf-8" src="ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="ueditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript" src="js/fixation.js"></script>
    <script type="text/javascript" src="ubox/ubox.js"></script>
    <script type="text/javascript" src="js/md5.js"></script>
    <style type="text/css">
        .bdsharebuttonbox{ display: none;}
    </style>
</head>
<body class="background_grey">
    <div class="header">
        <div class="header_in">
            <div class="header_logo">
                <h1></h1>
                <img src="images/index_log.jpg" />
            </div>
            <div class="header_nav">
                <ul>
                    <li><a href="model_news_list.html">前沿资讯</a></li>
                    <li><a href="model_problem_list.html">互动问答</a></li>
                    <li><a href="model_personage_center.html">帮助中心</a></li>
                </ul>
            </div>
            <div class="header_info">
                <div class="header_info_find"><a href="#">寻找合作伙伴</a></div>
                <div class="header_register">
                    <a href="#">登录</a>|
                    <a href="#">注册</a>
                </div>
                <div class="header_become">
                    <a href="#">成为我们的专家</a>
                </div>
            </div>
            <div class="clear_both"></div>
        </div>
    </div>
    <div class="problem_detail problem_detail_new">
        <div class="problem_detail_left">
            <div id="questionDetail">
                <!-- <div class="problem_detail_left_title">
                    <div class="problem_detail_left_item_title">
                        <div class="problem_detail_left_item_img">
                            <img src="images/problem_list_img2.jpg" alt="" />
                        </div>
                        <div class="problem_detail_left_item_title_person"><span>张光斗</span>（中医院院士）<i>发起了问题</i></div>
                    </div>
                    <div class="problem_detail_left_title_h2">
                        如何看待北京大学医学部周德敏/张礼和课题组在病毒疫苗领域取得重大突破？
                    </div>
                    <p class="problem_detail_left_title_detail">用户运营，产品运营，社区运营，活动运营共性都是围绕人的关系维系而出发的，只是其各自侧重点略有不同。用户运营，产品运营，社区运营，活动运营共性都是围绕人的关系维系而出发的，只是其各自侧重点略有不同。</p>
                    <div class="problem_detail_left_item_btn">
                        <span class="more">显示全部</span>
                    </div>
                    <div class="problem_detail_left_title_num"><span class="label">所属标签</span><span class="share">分享</span></div>
                    <div class="problem_detail_left_item_title_link"><a href="">查看全部12条</a></div>
                </div> -->
            </div>
            <div class="problem_detail_left_list">
                <div class="problem_detail_left_list_title">
                    <span class="answer">13个答案</span>
                    <em>排序方式</em>
                </div>
                <ul id="problem_list">
                    <li class="problem_detail_left_item" data_id="1">
                        <div class="problem_detail_left_item_left active">
                            123
                        </div>
                        <div class="problem_detail_left_item_right">
                            <div class="problem_detail_left_item_title">
                                <div class="problem_detail_left_item_img">
                                    <img src="images/problem_list_img2.jpg" alt="" />
                                </div>
                                <div class="problem_detail_left_item_title_person"><span>何国波</span>（中医院院士）</div>
                            </div>
                            <div class="problem_detail_left_item_detail">运营的核心目的是为了产品能够活得更好更持久，尽可能放大产品的覆盖用户量和延长产品的生命周期。而上述用户运营、活动运营、产品运营等都是看待运营的一种视角和去梳理工作的方式。它们最主要的区别在于：考虑问题的中心点和侧重点有所不同。就目前而言，互联网行业内相对比较运营的核心目的是为了产品能够活得更好更持久，尽可能放大产品的覆盖用户量和延长产品的生命周期。而上述用户运营、活动运营、产品运营等都是看待运营的一种视角和去梳理工作的方式。它们最主要的区别在于：考虑问题的中心点和侧重点有所不同。就目前而言，互联网行业内相对比较
                            </div>
                            <textarea name="" class="problem_detail_left_item_detail_textarea"> 运营的核心目的是为了产品能够活得更好更持久，尽可能放大产品的覆盖用户量和延长产品的生命周期。而上述用户运营、活动运营、产品运营等都是看待运营的一种视角和去梳理工作的方式。它们最主要的区别在于：考虑问题的中心点和侧重点有所不同。就目前而言，互联网行业内相对比较 </textarea>
                            <div class="problem_detail_left_item_info">
                                <span>发布于2016-12-14</span>    
                                <span class="answer">190 回答</span>
                                <span class="share" ontab="1">分享
                                    <!-- <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a></div> -->
                                    <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
                                </span>
                                <span class="revamp" id="compile_revamp">修改答案</span>
                                <span class="evenmore" id="compile_evenmore">
                                    更多
                                    <ol>
                                        <li id="compile_evenmore_delete">删除</li>
                                    </ol>
                                </span>
                                <em class="delete" id="compile_delete">取消</em>
                                <em class="submit" id="compile_submit">提交</em>
                                <div class="clear_both"></div>
                            </div>
                        </div>
                        <div class="clear_both"></div>
                    </li>
                    <li class="problem_detail_left_item" data_id="2">
                        <div class="problem_detail_left_item_left">
                            123
                        </div>
                        <div class="problem_detail_left_item_right">
                            <div class="problem_detail_left_item_title">
                                <div class="problem_detail_left_item_img">
                                    <img src="images/problem_list_img2.jpg" alt="" />
                                </div>
                                <div class="problem_detail_left_item_title_person"><span>何国波</span>（中医院院士）</div>
                            </div>
                            <div class="problem_detail_left_item_detail">
                                运营的核心目的是为了产品能够活得更好更持久，尽可能放大产品的覆盖用户量和延长产品的生命周期。而上述用户运营、活动运营、产品运营等都是看待运营的一种视角和去梳理工作的方式。它们最主要的区别在于：考虑问题的中心点和侧重点有所不同。就目前而言，互联网行业内相对比较
                            </div>
                            <div class="problem_detail_left_item_info">
                                <span>发布于2016-12-14</span>    
                                <span class="answer">190 回答</span>
                                <span class="share" ontab="1">分享
                                    <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
                                </span>
                                <div class="clear_both"></div>
                            </div>
                        </div>
                        <div class="clear_both"></div>
                    </li>
                    <li class="problem_detail_left_item" data_id="3">
                        <div class="problem_detail_left_item_left">
                            123
                        </div>
                        <div class="problem_detail_left_item_right">
                            <div class="problem_detail_left_item_title">
                                <div class="problem_detail_left_item_img">
                                    <img src="images/problem_list_img2.jpg" alt="" />
                                </div>
                                <div class="problem_detail_left_item_title_person"><span>何国波</span>（中医院院士）</div>
                            </div>
                            <div class="problem_detail_left_item_detail">
                                运营的核心目的是为了产品能够活得更好更持久，尽可能放大产品的覆盖用户量和延长产品的生命周期。而上述用户运营、活动运营、产品运营等都是看待运营的一种视角和去梳理工作的方式。它们最主要的区别在于：考虑问题的中心点和侧重点有所不同。就目前而言，互联网行业内相对比较
                            </div>
                            <div class="problem_detail_left_item_info">
                                <span>发布于2016-12-14</span>    
                                <span class="answer">190 回答</span>
                                <span class="share" ontab="1">分享
                                    <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>

                                </span>
                                <div class="clear_both"></div>
                            </div>
                        </div>
                        <div class="clear_both"></div>
                    </li>
                </ul>
            </div>
            <div class="problem_load_more_outer">
                <div class="problem_load_more" id="moreBt">
                    查看更多答案
                </div>
            </div>
            <div class="problem_detail_text">
                <script id="editor" type="text/plain" class="problem_detail_text_textarea"></script>
                <div class="problem_detail_text_btn">
                    <button>发布答案</button>
                </div>
            </div>
            <div class="problem_detail_text_already">一个问题你只能回答一次，但你可以都对<span>现有的回答</span>进行修改</div>
        </div>
        <div class="problem_detail_right" id="fixed_right">
            <div class="problem_detail_right_top">
                <div class="problem_detail_right_btn blue">关注问题</div>
                <p class="problem_detail_right_top_info"><span>125</span>人关注该问题</p>
            </div>
            <div class="problem_detail_right_bottom">
                <div class="problem_detail_right_bottom_title">
                    相关问题
                </div>
                <ul class="news_list_right_list">
                    <li class="news_list_right_item">
                        <div class="news_list_right_item_font"><a href="#">最新资讯最新资讯最新资讯最新资讯最新资讯最新最新资讯</a></div>
                        <div class="news_list_right_item_answer">12个回答</div>
                    </li>
                    <li class="news_list_right_item">
                        <div class="news_list_right_item_font"><a href="#">最新资讯最新资讯最新资讯最新资讯最新资讯最新最新资讯</a></div>
                        <div class="news_list_right_item_answer">12个回答</div>
                    </li>
                    <li class="news_list_right_item">
                        <div class="news_list_right_item_font"><a href="#">最新资讯最新资讯最新资讯最新资讯最新资讯最新最新资讯</a></div>
                        <div class="news_list_right_item_answer">12个回答</div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="index_footer">
        <div class="index_footer_link">
            <a href="">新闻公告</a>|
            <a href="">关于我们</a>|
            <a href="">联系我们</a>|
            <a href="">用户协议</a>
        </div>
        <p class="index_footer_copy">Copyright©2016 yk-zb.com 粤科众包 版权所有 粤ICP备16027165号-1</p>
    </div>
    <div class="shadow">
        <div class="problem_shadow">
            <div class="problem_shadow_title">
                我要提问<span>X</span>
            </div>
            <div class="problem_shadow_main">
                <input type="text" placeholder="写下你的问题" class="problem_shadow_ipt"/>
                <p>问题描述（选填）：</p>
                <textarea name="" id="" cols="30" rows="10" placeholder="请填写问题的详细描述···" class="problem_shadow_textarea"></textarea>
                <p>选择标签：</p>
                <select name="" id="" class="problem_shadow_select">
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                </select>
                <div class="problem_shadow_btn">
                    <span class="publish" id="btn_publish">发布</span>
                    <span class="abolish" id="btn_abolish">取消</span>
                </div>
            </div>
        </div>
        <div class="delete_answer_shadow">
            <div class="delete_answer_shadow_title">确定删除您的回答？</div>
            <p>删除后关于该回答的数据都会被清除</p>
            <div class="problem_shadow_btn">
                <span class="publish" id="delete_answer_publish">确定</span>
                <span class="abolish" id="delete_answer_abolish">取消</span>
            </div>
        </div>
    </div>
    <script id="problemDetail" type="text/template">
        <div class="problem_detail_left_title" questions_id="<#= questionsId #>" pub_date="<#= pubDate #>" user_id="<#= userBase.userId #>">
            <div class="problem_detail_left_item_title">
                <div class="problem_detail_left_item_img">
                    <img src="<#= userBase.headImgUrl #>" alt="" />
                </div>
                <div class="problem_detail_left_item_title_person"><span><#= userBase.nickname #></span>（中医院院士）<i>发起了问题</i></div>
            </div>
            <div class="problem_detail_left_title_h2">
                <#= title #>
            </div>
            <p class="problem_detail_left_title_detail"><#= describe #></p>
            <div class="problem_detail_left_item_btn">
                <span class="more" ontab="1">显示全部</span>
            </div>
            <div class="problem_detail_left_title_num">
                <span class="label">所属标签</span>
                <span class="share" ontab="1">分享
                    <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
                </span>
            </div>
            <div class="problem_detail_left_item_title_link"><a href="">查看全部<#= answerNum #>条</a></div>
        </div>
    </script>
    <script id="problemItem" type="text/template">
        <li class="problem_detail_left_item" pub_date="<#= pubDate #>" user_id="<#= pubUserBase.userId #>">
            <div class="problem_detail_left_item_left active">
                <#= commentNum #>
            </div>
            <div class="problem_detail_left_item_right">
                <div class="problem_detail_left_item_title">
                    <div class="problem_detail_left_item_img">
                        <img src="<#= pubUserBase.headImgUrl #>" alt="" />
                    </div>
                    <div class="problem_detail_left_item_title_person"><span><#= pubUserBase.nickname #></span>（中医院院士）</div>
                </div>
                <div class="problem_detail_left_item_detail"><#= answerContent #></div>
                <div class="problem_detail_left_item_info">
                    <span>发布于<#= pubDate #></span>    
                    <span class="answer"><#= commentNum #> 回答</span>
                    <span class="share" ontab="1">分享
                        <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
                    </span>
                    
                    <div class="clear_both"></div>
                </div>
            </div>
            <div class="clear_both"></div>
        </li>
    </script>

                <!-- <# if( status == 1 ){ #>
                    <textarea name="" class="problem_detail_left_item_detail_textarea"><#= detail #></textarea>
                <# } #> 
                    <# if( status == 1 ){ #>
                        <em class="revamp" id="compile_revamp">修改答案</em>
                        <em class="delete" id="compile_delete">取消</em>
                        <em class="submit" id="compile_submit">提交</em>
                    <# } #>
                -->
</body>
</html>
<script type="text/javascript">
    /*输入框*/
     var ue = UE.getEditor('editor', {
    toolbars: [[
             'source', '|', 'undo', 'redo', '|',
            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', 
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify'
        ]],
        autoHeightEnabled: true,
        autoFloatEnabled: true,
        initialFrameWidth:800,  //初始化编辑器宽度,默认1000
        initialFrameHeight:130 , //初始化编辑器高度,默认320
        enableAutoSave: false
    });
     $('.problem_detail_text_btn button').click(function(event) {
        var jsonStr = {};
         ue.ready(function(){
            var html = ue.getContent();
            console.log(html);
            jsonStr.pubUserBase.userId = 1;
            jsonStr.pubDate = 1483515962697;
            jsonStr.commentNum  = 0;
            jsonStr.pubUserBase.headImgUrl = "http://oflheqgex.bkt.clouddn.com/FgIiW_xtEWUiqdsnXcYRA54WLed9?v=1";
            jsonStr.pubUserBase.nickname = 'dsafgw';
            jsonStr.answerContent = html;
            var t = _.template($("#problemDetail").text());
            var htmlTxt = t(questionItem);
            $('#questionDetail').append(htmlTxt);
            $('.problem_detail_left_item_btn .more').show();
         })
     });
    $(function() {
        var questions = '';
        /*加载问题*/
        (function loadQuestion(){
            encryptMd5.data = {
                questionsId : 181,
                userId : 335 
            }
            sMd5 = encryptMd5.fnData();
            var rnd = parseInt(Math.random()*1000+1);
            $.ajax({
                    type: "get",
                    url: 'http://192.168.100.219:6071/json/questionsInfo',
                    rnd: rnd,
                    data : sMd5,
                    dataType: "json",
                    success: function(result) {
                            if(result.code == 0){
                                console.log(result);
                                var questionItem = result.data;
                                if(questionItem.describe.length >= 50){
                                    questions=questionItem.describe;
                                    questionItem.describe = questionItem.describe.substring(0,50) + '······';
                                    var t = _.template($("#problemDetail").text());
                                    var htmlTxt = t(questionItem);
                                    $('#questionDetail').append(htmlTxt);
                                    $('.problem_detail_left_item_btn .more').show();
                                }else{
                                    var t = _.template($("#problemDetail").text());
                                    var htmlTxt = t(questionItem);
                                    $('#questionDetail').append(htmlTxt);
                                }
                            }else{
                                UBox.show('加载失败', -1);
                            }
                    }
              });
        })();
        /*获取答案*/
        (function fnPaging(){
            encryptMd5.data = {
                questionsId : 181,
                pageSize : 5 ,
                lastId : 0 ,
                userId : 335 
            }
            sMd5 = encryptMd5.fnData();
            console.log(sMd5);
            var pages = 5 ;    //分页总页数
            var page = 1;
            function loadmore() {
                var rnd = parseInt(Math.random()*1000+1);
                          //alert("currentPage=" + page + ",totalePage=" + pages);
                /*var url=" " + "/" + page;//页面
                var json = {
                    time : '2016-05-23 21:09',
                    url_img : 'images/news_detail_img.jpg',
                    title : '云服务为什么需要配备1对1队告诉你',
                    detail : '网易云信全新推出T服务，独创1对1技术顾问实时响应创1对1技术顾问实时响应创1对1技术顾问实时响应解决每个技术难题，让你不再惧怕上云',
                    time : '文/<i>Zoe</i> ·2小时前',
                    read : '13,240' ,
                    like : '1235',
                    status : 0
                }
                // console.log(json)
                var t = _.template($("#problemItem").text());
                var htmlTxt = t(json);
            // console.log(t,htmlTxt)
            $('#problem_list').append(htmlTxt);*/
                $.ajax({
                        type: "get",
                        url: 'http://192.168.100.219:6071/json/getAnswerList',
                        data:sMd5,
                        rnd: rnd,
                        dataType: "json",
                        success: function(result) {
                                console.log(result)
                                var list = result.data;
                                      //每次都返回总页数
                                      // pages = result.data.page_size;
                                      console.log(list);
                                      for(var i = 0; i < list.length; i++){
                                            var order_item = list[i];
                                            order_item.pubDate = getTimeLatser(order_item.pubDate);
                                            console.log(order_item);
                                            var t = _.template($("#problemItem").text());
                                            var htmlTxt = t(order_item);

                                            $('#problem_list').append(htmlTxt);
                                      }
                        }
                  });
                };
                loadmore();
                $("#moreBt").click(function(event) {
                    if(page >= pages){
                        $("#moreBt").html('没有更多');
                        return false;
                    }else{
                         page++;
                    }
                    loadmore()
                });
        })();
        /*文字省略以及点击more按钮*/
        // console.log(questionDetail)
        $("#questionDetail").on("click",'.more', function(e) {
            console.log(questions);
            var oParent = $('#questionDetail .problem_detail_left_title_detail');
            var dataId = $(this).parents('.problem_detail_left_title').attr('questions_id');
            if($(this).attr('ontab')=='1'){
                oParent.html(questions);
                $(this).html('收起');
                $(this).attr('ontab','0');
            }else{
                var str = questions.substring(0,50);
                oParent.html(str+'······');
                $(this).html('显示全部');
                $(this).attr('ontab','1');
            }
        });
        /*
        (function fnMore(){
            var arrStr = [];
            $('.problem_detail_left_item_detail').each(function(index, el) {
                var strOld = $(this).html();
                var strNow = strOld ;
                arrStr.push(strOld);
                console.log(arrStr);

                if(strOld.length >= 300){
                    strNow = strOld.substring(0,300) + '······';
                    $('.more').eq(index).show();
                }
                $(this).html(strNow);
            });
            $('.more').click(function(event) {
                var index = $('.more').index(this);
                var oParent = $(this).parent().siblings('.problem_detail_left_item_detail');
                oParent.html(arrStr[index]);
                $(this).hide();
            });
        })();*/
        $('#put_questions').click(function(event) {
            $('.shadow').fadeIn();
            return false;
        });
        $('.problem_shadow_title span').click(function(event) {
            $('.shadow').fadeOut();
        });
        $('#btn_publish').click(function(event) {
            var ipt = $('.problem_shadow_ipt').val();
            var txta = $('.problem_shadow_textarea').val();
            var select = $('.problem_shadow_select').val();
            if(ipt == '' || txta == '' || select == ''){
                return false;
            }
            console.log(ipt,txta,select);
        });
        $('#btn_abolish').click(function(event) {
            $('.shadow').fadeOut(200,function(){
                $('.problem_shadow_ipt').val('');
                $('.problem_shadow_textarea').val('');
                $('.problem_shadow_select').val('');
            });
        });
        $("#problem_list").on("click",'.problem_detail_left_item_left', function(e) {
            var value = parseInt($(this).html());
            if($(this).hasClass('active')){
                $(this).removeClass('active');
                $(this).html(value-1);
            }else{
                $(this).html(value+1);
                $(this).addClass('active');
            }
        });
        $("#problem_list").on("click",'#compile_revamp', function(e) {
            var value = $(this).parent().siblings('.problem_detail_left_item_detail').html();
            var reg=new RegExp("<br>","g"); //创建正则RegExp对象 
            value = value.replace(reg,"\n");
            $(this).parent().siblings('.problem_detail_left_item_detail_textarea').val(value);
            $(this).parent().parent().parent('.problem_detail_left_item').addClass('active');
        });
        $("#problem_list").on("click",'#compile_delete', function(e) {
            $(this).parent().parent().parent('.problem_detail_left_item').removeClass('active');
        });
        /*更多弹出删除按钮*/
        $("#problem_list").on("click",'#compile_evenmore', function(e) {
            if($(this).hasClass('active')){
                $(this).removeClass('active');
            }else{
                $(this).addClass('active');
                $(this).children('ol').slideDown();
            }
            
        });
        /*点击删除按钮*/
        $("#problem_list").on("click",'#compile_evenmore_delete', function(e) {
            $('.shadow').fadeIn();
            $('.delete_answer_shadow').fadeIn();
            var dataId = $(this).parents('.problem_detail_left_item').attr('data_id');
            $('.delete_answer_shadow').attr('data_id',dataId);
            return false;
            
        });
        /*确定删除*/
        $('#delete_answer_publish').click(function(event) {
            var dataId = $(this).parents('.delete_answer_shadow').attr('data_id');
            console.log(dataId);
            console.log($(".problem_detail_left_item[data_id='"+dataId+"']").attr('data_id'))
            $(".problem_detail_left_item[data_id='"+dataId+"']").remove();
            $('.shadow').fadeOut();
            $('.delete_answer_shadow').fadeOut();
        });
        /*取消删除*/
        $('#delete_answer_abolish').click(function(event) {
            $('.shadow').fadeOut(200,function(){
                
            });
        });
        $("#problem_list").on("click",'#compile_submit', function(e) {
            var value = $(this).parent().siblings('.problem_detail_left_item_detail_textarea').val();
            console.log(value);
            value = value.replace(/\n|\r\n/g,"<br>");
            /*$.ajax({
                type: "POST",
                url: url,
                rnd: rnd,
                dataType: "json",
                success: function(result) {
                        if(result.code == 1){
                              $(this).parent().siblings('.problem_detail_left_item_detail').html(value);
                              $(this).parent().parent().parent('.problem_detail_left_item').removeClass('active');
                        }else{
                                  UBox.show('加载失败', -1);
                        }
                }
            });*/
            $(this).parent().siblings('.problem_detail_left_item_detail').html(value);
            $(this).parent().parent().parent('.problem_detail_left_item').removeClass('active');
        });
        $(".problem_detail").on("click",".share",function(e){
            var text = $(this).parent().siblings('.problem_detail_left_item_detail').html();
            if($(this).attr('ontab') == '1'){
                $(this).children('.bdsharebuttonbox').show();
                console.log(text);
                /*window._bd_share_config={"common":{"bdSnsKey":{},"bdText":""+text+"","bdMini":"1","bdMiniList":["tsina","weixin"],"bdPic":"","bdStyle":"1","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];*/
                window._bd_share_config={"common":{"bdSnsKey":{},"bdText":""+text+"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16", "onBeforeClick":function(cmd,config){location.reload() ; }},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到：","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
                $(this).attr('ontab','0');
            }else{
                $(this).children('.bdsharebuttonbox').hide();
                $(this).attr('ontab','1');
            }
        })
    });
</script>